﻿using Microsoft.OData.Client;
using System.Reflection;

namespace EasyXaf.ObjectSpaces.OData;

public static class TypeExtensions
{
    public static string GetEntitySetName(this Type objectType)
    {
        return objectType.GetCustomAttribute<EntitySetAttribute>()?.EntitySet ?? objectType.Name;
    }
}